﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BrowsableNumericAttribute.cs" company="Marcelo Roca">
//   Copyright (c) 2011 Marcelo Roca. All rights reserved.
// </copyright>
// <author name="Marcelo Roca" email="marce@marceloroca.com"/>
// <license>
//   This program is free software: you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation, either version 3 of the License, or
//   (at your option) any later version.
// 
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program.  If not, see http://www.gnu.org/licenses/.
// </license>
// --------------------------------------------------------------------------------------------------------------------

namespace GameKits.Unity.SmartInspector
{
    /// <summary>
    /// Es el atributo que le pondremos a los métodos, campos y propiedades de las
    /// clases que serán editadas por el EasyInspector. 
    /// <para/>
    /// <para>Este atributo adiciona al <see cref="T:GameKits.Unity.SmartInspector.BrowsableAttribute">BrowsableAttribute</see> propiedades
    /// para el manejo de valores numéricos.</para>
    /// </summary>
    /// <remarks>
    /// Utilice este tipo de atributo cuando quiera mostrar en el editor valores
    /// numéricos.
    /// </remarks>
    /// <example>
    /// El siguiente ejemplo demuestra el uso de <see cref="T:GameKits.Unity.SmartInspector.BrowsableAttribute">BrowsableAttribute</see> 
    /// <para/>
    /// <code lang="C#">
    /// using  MarceWare.Unity;
    /// <para/>
    /// using UnityEngine;
    /// <para/>
    /// public class MyObject : MonoBehaviour
    /// {
    ///     [BrowsableNumeric(Order = 0, Tooltip = &quot;float value&quot;, Min = 5, Max= 20, ShowSlider = true)]
    ///     public float floatValue = 5f;
    /// }</code>
    /// </example>
    /// <seealso cref="T:GameKits.Unity.SmartInspector.BrowsableAttribute">BrowsableAttribute</seealso>
    public class BrowsableNumericAttribute : BrowsableFieldAttribute
    {
        /// <summary>
        /// Gets or sets a value indicating whether ShowSlider.
        /// </summary>
        public bool ShowSlider { get; set; }

        /// <summary>
        /// Gets or sets Min.
        /// </summary>
        public float Min { get; set; }

        /// <summary>
        /// Gets or sets Max.
        /// </summary>
        public float Max { get; set; }
    }
}
